package com.applcn.order.constant;

import com.baomidou.mybatisplus.core.enums.IEnum;

/**
 * com.applcn.order.constant
 * Description:
 *
 * @author: 大妖怪
 * @date: 2020-01-20 00:19
 */
public enum OrderStatusEnum implements IEnum<Integer> {

    /**
     * 待支付
     */
    WAIT_PAY(0, "待支付"),

    /**
     * 已支付/待发货
     */
    PAID(1, "已支付/待发货"),

    /**
     * 已发货/待收货
     */
    SHIPPED(2, "已发货/待收货"),

    /**
     * 已收货/待评价
     */
    RECRIVED(3, "已收货/待评价"),

    /**
     * 订单已完成/已评价
     */
    FINISHED(4, "已完成/已评价"),

    /**
     * 申请退款
     */
    APPLY_FOR_REFUND(5, "申请退款/待退款"),

    /**
     * 退款成功
     */
    REFUND_SUCCESS(6, "退款成功/已退款"),

    /**
     * 拒绝退款
     */
    REFUND_REFUSE(7, "拒绝退款"),

    /**
     * 订单超时
     */
    TIME_OUT(8, "订单超时"),

    /**
     * 已取消
     */
    CANCEL(9, "已取消"),

    /**
     * 已关闭
     */
    CLOSED(10, "已关闭");

    private int code;
    private String desc;

    OrderStatusEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    @Override
    public Integer getValue() {
        return this.getCode();
    }
}
